package com.matt.service;

import com.matt.controller.po.ProductPO;
import com.matt.domain.Product;
import com.matt.foundation.query.ProductQuery;
import com.matt.foundation.vo.ProductTypeVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

/**
 * ******************
 * Created by Ron
 * from com.matt
 * on 2018/6/13 0013.
 * ******************
 */
public interface ProductService {

    Page<Product> getPages(ProductQuery query, Pageable pageable);

    Product findByName(String name, String areaId);

    Product findByNameAndAreaId(String name, String areaId);

//    Product add(String code, String name, Integer isVisible, Integer type, BigDecimal standardAmount, String unit,String areaId);
    Product add(String staffId, ProductPO param);

    Product update(String staffId,  ProductPO param);

    Product update(Product product);

    boolean delete(String id, String areaId);

    List<ProductTypeVo> getTypeByAreaId(String areaId);

    Product findOne(String id, String areaId);

    Product findById(String id);

    List<Product> findAllByIds(String areaId, List<String> ids);

}
